<template>
	<view class="home-page">
		<u-navbar leftIconColor="#fff" :autoBack="true" :placeholder="true" bgColor="rgba(255,255,255,0.0)">
			<view slot="center" class="nav-title">
				账号记录
			</view>
		</u-navbar>
		<view style="height: 100rpx;"></view>
		<view class="content">
			<view class="head-tabs">
				<view :class="current == index?'active-item': 'tabs-item'" class="tabs-item"
					v-for="(item,index) in tabsList" :key="index" @click="cutTab(index)">
					{{item.text}}
				</view>
			</view>
			<view v-if="current == 0">
				<view class="box">
					<view class="item">
						<view class="item-title">
							日期
						</view>
						<view class="item-text">
							2025年3月1日
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							保单编号
						</view>
						<view class="item-text">
							TW025420252525645656
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							购保人姓名
						</view>
						<view class="item-text">
							张三
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							缴纳金额
						</view>
						<view class="item-text">
							3000
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							本次缴纳期数
						</view>
						<view class="item-text">
							1期
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							总期数
						</view>
						<view class="item-text">
							245期
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							已缴纳期数
						</view>
						<view class="item-text">
							16期
						</view>
					</view>
				</view>
			</view>
			<view v-if="current == 1">
				<view class="box">
					<view class="item">
						<view class="item-title">
							日期
						</view>
						<view class="item-text">
							2025年3月1日
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							保单编号
						</view>
						<view class="item-text">
							TW025420252525645656
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							姓名
						</view>
						<view class="item-text">
							张三
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							领取金额
						</view>
						<view class="item-text">
							4500
						</view>
					</view>
				</view>
				<view class="box">
					<view class="tips">
						养老保险未到领取时间
					</view>
					<view class="item">
						<view class="item-title">
							保单编号
						</view>
						<view class="item-text">
							TW025420252525645655
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							姓名
						</view>
						<view class="item-text">
							李伟
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							每月领取
						</view>
						<view class="item-text">
							5500
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							领取日期
						</view>
						<view class="item-text">
							2055年3月
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabsList: [{
						text: '缴纳记录'
					},
					{
						text: '领取记录'
					}
				],
				current:0
			}
		},
		methods: {
			cutTab(index) {
				this.current = index
			},
		}
	}
</script>

<style>
	page {
		background-color: #FBFBFB;
	}
</style>
<style lang="scss" scoped>
	.home-page {
		background-image: url('../../../static/real/home-bg.png');
		background-repeat: no-repeat;
		background-size: 100% 362rpx;
		min-height: 90vh;

		.nav-title {
			color: #fff;
		}

		.content {
			padding: 30rpx;
			background-color: #fff;
			border-top-right-radius: 30rpx;
			border-top-left-radius: 30rpx;
			min-height: 50vh;

			.head-tabs {
				display: flex;
				justify-content: space-around;
				padding: 15rpx;
				border-radius: 40rpx;
				background-color: #F5F5F5;

				.tabs-item {
					width: 50%;
					color: #999999;
					font-size: 28rpx;
					font-weight: bold;
					padding: 15rpx;
					text-align: center;
					border-radius: 30rpx;
				}

				.active-item {
					background-color: #18BE8C;
					color: #fff;
				}
			}

			.box {
				background-color: #fff;
				padding: 20rpx;
				border-radius: 30rpx;
				box-shadow: 0rpx 3rpx 32rpx 1rpx rgba(0, 0, 0, 0.08);
				margin-top: 30rpx;

				.item {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-bottom: 10rpx;
					font-size: 26rpx;

					.item-title {
						color: #666666;
					}

					.item-text {
						color: #333333;
					}
				}
				.tips {
					padding-bottom: 20rpx;
					margin-bottom: 20rpx;
					border-bottom: 1rpx solid #F1F1F1;
					color: #FF5050;
					font-size: 26rpx;
					font-weight: bold;
				}
			}
		}
	}
</style>